HAL SAI migration: List of applicable concepts ¶
This section provides information about the HAL SAI applicable architecture concepts.
Concepts for SAI ¶
|
Concept |
Description |
|---|---|
|
Initialization has been split into separate initialization and configuration functions:
|
|
|
Removal and conversion of init structure to configuration structure |
The initialization structure
|
|
The handle structure has been renamed to
|
|
|
The
|
|
|
The functions
|
|
|
New APIs have been introduced to get and set SAI features. |
|
|
In HAL2, DMA link APIs are provided with explicit naming and parameters :
|
|
|
Individual callback registration APIs replace global register and unregister functions |
Split global register callback SAI into one register per callback and remove unregister callback SAI. |
|
All hardware macros have been removed from the HAL SAI driver, and equivalent services are converted into HAL static inline APIs. |
|
|
The SAI state machine has been reworked to ensure transitions between the peripheral’s functional states. |
|
|
The HAL SAI functions were updated to return:
|
|
|
Rename the error management function to
|
|
|
All TypeDef parts of the HAL SAI driver have been removed and replaced by
|
|
|
The
|
|
|
Merge HAL extension files with common ones and remove the EX prefix from APIs. |
Only one HAL SAI header file remains and all macros, define statements, and functions from
|
|
Provide RTOS-compatible acquire/release bus services for communication peripheral drivers. |
New functions,
|
|
Add HAL PPP Services for Drivers with Handle to Retrieve Corresponding Peripheral Clock Frequency. |
The HAL SAI driver provides a new API to retrieve the clock frequency:
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including SAI instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
All HAL SAI functions start with
|
Other HAL SAI changes ¶
|
Concept |
Consideration |
|---|---|
|
Remove
|
The function
The functionality has been consolidated into the
|